package cn.zsb.innerClassDemo;

public class Test {
    public static void main(String[] args) {

        new Swim() {
            @Override
            public void swim() {
                System.out.println("重写了游泳的方法");
            }
        };

        new Animal(){

            @Override
            public void eat() {
                System.out.println("重写了eat方法");
            }
        };
        //Outer.Inner oi = new Outer().new Inner();
        /*Outer.Inner oi = new Outer().new Inner();
        oi.show();*/
        /*//非静态方法
        Outer.Inner oi = new Outer.Inner();
        oi.show1();
        //静态方法
        Outer.Inner.show2();*/
    }
}
